#导包


from api.litemall_login import LiteLogin

#创建测试类
class TestLiteLogin:
    def setup_method(self):
        #创建面向对象
        self.lite_login=LiteLogin()
    def teardown(self):
        pass

    def test01_login(self,):
        self.json_data={
            "username":"user123",
            "password":"user123"
                        }
        resp1=self.lite_login.login(self.json_data)
        assert 200 == resp1.status_code
        assert "成功"==resp1.json().get("errmsg")